<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.lmpop.trade.ti_evaluate.Ti_evaluateInfo" %>
<%@ page import="com.lmpop.frame.util.PageTools" %> 
<%@ page import="com.lmpop.frame.util.Config" %>
<%
  request.setCharacterEncoding("UTF-8");
	
  Ti_evaluateInfo ti_evaluateInfo = new Ti_evaluateInfo();    
  
  Map params = new Hashtable();
  String s_order_no="",s_info_level="";
  if(request.getParameter("s_order_no")!=null && !request.getParameter("s_order_no").equals(""))
  {
      s_order_no = request.getParameter("s_order_no"); 
      params.put("e_order_no",s_order_no); 
  } 
 
  if(request.getParameter("s_info_level")!=null && !request.getParameter("s_info_level").equals(""))
  {
      s_info_level = request.getParameter("s_info_level"); 
      params.put("e_info_level",s_info_level); 
  }
   
    params.put("send_user_id",_user_id); 
//out.print(_user_id);  
    String iStart = "0";
	int limit = 10;
	if(request.getParameter("iStart")!=null) iStart = request.getParameter("iStart");
	List list = ti_evaluateInfo.getListByPage(params,Integer.parseInt(iStart),limit);
	int counter = ti_evaluateInfo.getCountByObj(params);
	String pageString = new PageTools().getGoogleToolsBar(counter,"index.jsp?s_info_level="+s_info_level+"&s_order_no="+s_order_no+"&iStart=",Integer.parseInt(iStart),limit);
	
	Config configa = new Config();
	String company_shop_path = configa.getString("company_shop_path");
	
%>
<div class="f-right ">

	<form action="index.jsp" name="homeForm" method="post">
      <tr>
        <td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_main">
            <tr>
              <th width="5%" height="40" align="center"><img src="/program/member/index/images/icon1.gif" ></th>
              <th width="65%"><h3>交易评价</h3></th>
			  <th width="30%"></th>
            </tr>
          </table>
		  
		  <div class="ts" >  
		  	<img src="/program/member/index/images/ts.gif" align="absmiddle" />
  
				<span style="font-size:12px; padding:5px 0;">&nbsp;如果您在订单交易完成后15天内没有对订单进行评价，系统默认将其评为好评。</span> 
		  
		
 
		  
		     <table width="100%"  cellspacing="0" cellpadding="0"  >
            <tr>
              <td height="35" align="left">
              	&nbsp;&nbsp;订单编号:
                <input type="text" class="input" name ="s_order_no" id= "s_order_no" maxlength="50">
					       &nbsp;评价级别:
					       <select name="s_info_level" id="s_info_level">
                              <option value="">请选择</option> 
                              <option value="0">好评</option> 
							  <option value="1">中评</option> 
							  <option value="2">差评</option> 
                           </select> 
 
             
      <input type="button" name="Submit" value="搜索" onclick="javascript:document.homeForm.submit();" class="button2"></td>
            </tr>
          </table>
   </div>
          <table width="100%"  cellspacing="1" cellpadding="1" class="table_ls">
            <tr>
			  		<!--<th  align="left" ></th> -->
					  <th width="43%" height="25" align="left">订单信息</th>  	
					  <th width="20%" align="left">评价级别</th>
					  <th width="20%" align="left">查看详细</th>
            </tr>
          </table>
          
          <% 
          		            int listsize = 0;
						    if(list!=null && list.size()>0){
							listsize = list.size();
							for(int i=0;i<list.size();i++){
									Hashtable map = (Hashtable)list.get(i);
									String order_no="",info_level="",level_name ="",shop_name="",cust_id="",info_id="";
									if(map.get("info_id")!=null) info_id = map.get("info_id").toString();
									if(map.get("order_no")!=null) order_no = map.get("order_no").toString();
									if(map.get("info_level")!=null) info_level = map.get("info_level").toString();
									if(map.get("shop_name")!=null) shop_name = map.get("shop_name").toString();
									if(map.get("cust_id")!=null) cust_id = map.get("cust_id").toString();
 
									if(info_level.equals("0"))
									{
									   level_name  ="好评";
									}	
									if(info_level.equals("1"))
									{
									   level_name  ="中评";
									}	
									if(info_level.equals("2"))
									{
									   level_name  ="差评";
									}
									String order_detail ="/program/member/order/detailindex.jsp?order_no="+order_no;
								
		  %>
		   <table width="100%"  cellpadding="1" cellspacing="1">
				 <tr>
					<td width="43%" height="30" colspan=2 style="background:#EBEBEB;" align="center">
						&nbsp;&nbsp;
						订单编号:<a href="<%=order_detail%>"><%=order_no%></a>&nbsp;
						
					</td>
					  <td width="20%" style="background:#EBEBEB;" align="center">&nbsp;&nbsp;<%=level_name%></td>
					  <td width="20%" style="background:#EBEBEB;" align="center"><a href="viewcommentindex.jsp?menu_id=<%=menu_id%>&order_no=<%=order_no%>#seeDetail">查看详细</a></td>
				  </tr>
					
		  </table>
          <%
          		}
          	}
          %>
          
          <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td width="4%" height="35" align="center">
              	<%=pageString%>
              </td>
            </tr>
          </table>

           <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td align="center">
              	<input type="hidden" name="listsize" id="listsize" value="<%=listsize %>" />
			          <input type="hidden" name="menu_id" id="menu_id" value="<%=menu_id %>" />
			  </td>
            </tr>
          </table>

        </td>
      </tr>
    </table>
   </form>
  </div>